{layout name="/base"}
    <div class="row">
      <div class="col-lg-12">
        <h1>企业动态管理 <small>企业动态信息列表</small></h1>
        <ol class="breadcrumb">
          <li><a href="/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li class="active"><i class="fa fa-table"></i> 企业动态信息列表</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          	这里可以添加、修改和删除企业动态文章
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <div class="col-lg-12">
        <div class="btn-group mybtn">
          <a href="/news/create" class="btn btn-primary">添加企业动态</a>
        </div>
        <div class="btn-group">
          <button class="btn btn-default" id="del" type="submit">删除</button>
        </div>
        <div class="table-responsive">
          <table class="table table-bordered table-hover table-striped tablesorter">
            <thead>
              <tr>
                <th><div class="checker"><span><input type="checkbox" name=""></span></div></th>
                <th>标题</th>
                <th>来源</th>
                <th>发布人</th>
                <th>发布时间</th>
                <th>操作</th>
              </tr>
            </thead>
            <tbody>
            <form id='delete' class="form-horizontal" role="form" action="" method="post">
            <input type="hidden" id='method' name="_method" value="DELETE">
              {volist name='list' id='vo'}
              <tr>
                <td><div class="checker"><span><input type="checkbox" name="ids[]" value="{$vo.id}" ></span></div></td>
                <td>{$vo.title}</td>
                <td>{$vo.source}</td>
                <td>{$vo.author}</td>
                <td>{$vo.created_at}</td>
                <td>
                  <a target='_blank' href={php} echo url("/web/newsmodel?id=".$vo['id']."",'','','www') {/php}>查看</a> |
                	<a href="/news/{$vo.id}/edit">编辑</a>
                </td>
              </tr>
              {/volist} 
            </form>   
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <!-- /.row -->
<script type="text/javascript" src="/jquery.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
    $("#del").click(function(){
      $("#delete").attr('action','/news/delete');
      $("#delete").submit();
      });
    });
</script>